<template>
    <div>
        <div class="page-body">
            <div class="page-header">
                <img :src="cardData._logo" alt="" srcset="">
                <div>
                    <div>{{ cardData.Name }}</div>
                    <div style="margin-top:3px;">{{ cardData.Phone }}</div>
                </div>
            </div>
            <div class="page-content">
                <div class="page-contenttext">
                    {{ cardData.Address }}
                </div>
            </div>
            <div class="page-footer" v-if="$slots.footer">
                <slot name="footer">
                </slot>
            </div>
        </div>
        <!-- {{ cmpCard }} -->
    </div>
</template>
  
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
    name: "CmpCard",
})
</script>
  
<script lang="ts" setup>
import { DefaultProps } from "element-plus";
import { ref, nextTick } from "vue";
import { CmpDataClass } from "@/model/Cmp";


let props = withDefaults(defineProps<{
    cardData: CmpDataClass
}>(), {
})
</script>
  
<style lang="less" scoped>
.page-body {
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    transition: 0.2s;

    &:hover {
        box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.05);
    }
}

.page-header {
    padding: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;

    &>img {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
        margin-right: 10px;
        border-radius: 3px;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
}

.page-content {
    padding: 10px;

}

.page-contenttext {
    color: rgba(0, 0, 0, 0.5);

    font-size: 13px;
    line-height: 17px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    height: 51px;
}

.page-footer {
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);

}
</style>